<% layout('/layouts/default.html', {title: '反馈', libs: ['validate','fileupload']}){ %>
<style>
	.lh-contentText {
		padding: 3px 0 0 8px;
		word-wrap: break-word;
		word-break: break-word;
	}
	.circle {
		border-radius: 50%;
		display: inline-block;
		margin-right: 10px;
		width: 10px;
		height: 10px;
		background: #00FF7F;
	}
	.circle1 {
		border-radius: 50%;
		display: inline-block;
		margin-right: 10px;
		width: 10px;
		height: 10px;
		background: #FF0000;
	}
	.circle2 {
		border-radius: 50%;
		display: inline-block;
		margin-right: 10px;
		width: 10px;
		height: 10px;
		background: #A9A9A9;
	}
	.newBox{
		width: 100%;
		position: relative;
		height: 100%;
		overflow: hidden;
	}
	.detailLeft{

		height: 100%;
		border-radius: 4px;
		overflow: auto;
		-webkit-box-sizing: border-box;
		box-sizing: border-box;
		width: calc(100% - 380px);
		margin-right: 10px;
		float: left;
	}
	.mainDepBoxright{

		height: 100%;
		border-radius: 4px;
		overflow:hidden;
		width: 370px;
		float: right;
		background: #ffffff;
	}
	.mainDepTopFix{
		height: 54px;
		line-height: 36px;
		margin-bottom: 10px;
		padding-left: 10px;
		-webkit-box-sizing: border-box;
		box-sizing: border-box;
		background: #fff;
		overflow: hidden;
	}
	.mainTopCen{
		padding: 0 10px 30px 10px;
		margin-bottom: 10px;
		border-radius: 4px;
		background: #fff;
	}
	.round{
		border-radius: 50%;
		background-color: #f88f06;
		width: 20px;
		height: 20px;
		display: inline-block;
		text-align: center;
		margin: 0px 5px;
		color: white;
		/*animation:anim 1s infinite;*/
	}


	.row{
		margin: 20px 10px !important;
	}
	.hide{
		color: #acacac!important;
	}
	.control-label{
		padding: 0px!important;
	}
	@keyframes anim {
		0%{
			background-color: blue;
		}
		25%{
			background-color: red;
		}
		50%{
			background-color: gold;
		}
		75%{
			background-color: green;
		}
		100%{
			background-color: gray;
		}
	}
</style>
<!--<div class="ui-layout-north">-->
<!--<div class="main-content">-->
<!--	<div class="box box-main">-->

<!--	</div>-->
<!--</div>-->
<!--</div>-->

<div class="ui-layout-center">
	<div class="main-content">
		<div class="box1 box-main newBox">
			<div class="detailLeft">
				<div class="box-header with-border mainDepTopFix">
					<div class="box-title">
						<button type="button" class="btn btn-default btn-sm" onclick="js.closeCurrentTabPage()" style="background: #FFF;border: 1px solid #DCDFE6;color: #606266;">${text('关 闭')}</button>
					</div>
<!--					<div style="float: right;">-->
<!--						<span><span class="circle"></span>正常推进</span>&emsp;-->
<!--						<span><span class="circle1"></span>未达标或不及预期</span>&emsp;-->
<!--						<span><span class="circle2"></span>未开始</span>-->
<!--					</div>-->
					<div style="float: right;">
						逾期未反馈次数<span style="line-height:1.4em;" class="round">${dcSupTaskActionRes.overTime}</span>
						<a style="cursor:pointer;" onclick=clickWatch()>查看></a>
					</div>
				</div>
				<#form:form id="inputForm" model="${taskReceiveOne}" action="${ctx}/audit/taskReceive/feedback" method="post" class="form-horizontal">
				<div class="box-body mainTopCen ">
					<h5 style="text-align: left;white-space: pre-line; word-wrap:break-word;">${dcSupTaskInfoRes.taskContent!'无'}</h5>
					<div><span style="color:#A9A9A9">牵头责任单位 :</span><span>  ${dcSupTaskActionRes.leaderOrgName!'无'}</span></div>
					<% if (dcSupTaskActionRes.explainContent!=null){ %>
					<div><span style="color:#A9A9A9">领导批示 :</span><span>  ${dcSupTaskActionRes.explainContent}</span></div>
					<% } %>
					<% if (taskReceiveOne.feedbackRequire!=null){ %>
					<div><span style="color:#A9A9A9">分阶段目标任务 :</span><span>  ${taskReceiveOne.feedbackRequire}</span></div>
					<% } %>
				</div>
				<div class="box-footer">
					<div class="row">
						<div class="col-xs-12">
							<div class="form-group">
								<label class="control-label col-sm-2" title="">
									<span class="required hide">*</span> 反馈截止日期：<i class="fa icon-question hide"></i></label>
								<div class="col-sm-8">
									<#form:hidden path="id"/>
									<#form:hidden path="isNewRecord"/>
									<#form:hidden path="taskId"/>
									<#form:hidden path="actionId"/>
									<#form:hidden path="feedbackStatus" defaultValue="2"/>
									<span class="lh-contentText">${taskReceiveOne.feedbackEndTimeStr!'无'}</span>
								</div>
							</div>
						</div>
					</div>
					<div class="row">
						<div class="col-xs-12">
							<div class="form-group">
								<label class="control-label col-sm-2" title="">
									<span class="required hide">*</span> 最新进展情况：<i class="fa icon-question hide"></i></label>
								<div class="col-sm-8">
									<label class="control-label" style="text-align: left;white-space: pre-line; word-wrap:break-word;">${taskReceiveOne.feedbackContent!'无'}</label>
								</div>
							</div>
						</div>
					</div>
					<div class="row">
						<div class="col-xs-12">
							<div class="form-group">
								<label class="control-label col-sm-2" title="">
									<span class="required hide">*</span> 存在问题：<i class="fa icon-question hide"></i></label>
								<div class="col-sm-8">
									<label class="control-label" style="text-align: left;white-space: pre-line; word-wrap:break-word;">${taskReceiveOne.feedbackAdvice!'无'}</label>
								</div>
							</div>
						</div>
					</div>
					<div class="row">
						<div class="col-xs-12">
							<div class="form-group">
								<label class="control-label col-sm-2" title="">
									<span class="required hide">*</span> 拟采取的工作举措：<i class="fa icon-question hide"></i></label>
								<div class="col-sm-8">
									<label class="control-label" style="text-align: left;white-space: pre-line; word-wrap:break-word;">${taskReceiveOne.feedbackMeasure!'无'}</label>
								</div>
							</div>
						</div>
					</div>
					<div class="row">
						<div class="col-xs-12">
							<div class="form-group">
								<label class="control-label col-sm-2" title="">
									<span class="required hide">*</span> 完成进度：<i class="fa icon-question hide"></i></label>
								<div class="col-sm-8">
<!--
									<#form:radio path="feedbackProgress" dictType="dc_feedback_progress" class="form-control "  readonly="true"/>
-->
									<span class="lh-contentText">${@DictUtils.getDictLabel('dc_feedback_progress', taskReceiveOne.feedbackProgress+'', '无')}</span>
								</div>
							</div>
						</div>
					</div>
					<div class="row">
						<div class="col-xs-12">
							<div class="form-group">
								<label class="control-label col-sm-2" title="">
									<span class="required hide">*</span> 完成率：<i class="fa icon-question hide"></i></label>
								<div class="col-sm-8">
									<span class="lh-contentText">${taskReceiveOne.feedbackRate==null?'无':taskReceiveOne.feedbackRate+'%'}</span>
								</div>
							</div>
						</div>
					</div>
					<div class="row">
						<div class="col-xs-12">
							<div class="form-group">
								<label class="control-label col-sm-2" title="">
									<span class="required hide">*</span> 是否需要市领导调度：<i class="fa icon-question hide"></i></label>
								<div class="col-sm-8">
									<!--
                                                                        <#form:radio path="feedbackProgress" dictType="dc_feedback_progress" class="form-control "  readonly="true"/>
                                    -->
									<span class="lh-contentText">${@DictUtils.getDictLabel('sys_yes_no', taskReceiveOne.dispatchFlag+'', '无')}</span>
								</div>
							</div>
						</div>
					</div>
					<div class="row" id="idOne">
						<div class="col-xs-12">
							<div class="form-group">
								<label class="control-label col-sm-2" title="">
									<span class="required hide">*</span> 选择调度：<i class="fa icon-question hide"></i></label>
								<div class="col-sm-8">
									<!--
                                                                        <#form:radio path="feedbackProgress" dictType="dc_feedback_progress" class="form-control "  readonly="true"/>
                                    -->
									<span class="lh-contentText">${@DictUtils.getDictLabel('dc_feedback_dispatch', taskReceiveOne.feedbackDispatch+'', '无')}</span>
								</div>
							</div>
						</div>
					</div>
					<div class="row">
						<div class="col-xs-12">
							<div class="form-group">
								<label class="control-label col-sm-2" title="">
									<span class="required hide">*</span> 反馈人：<i class="fa icon-question hide"></i></label>
								<div class="col-sm-8">
									<span class="lh-contentText">${taskReceiveOne.feedbackName!'无'}</span>
								</div>
							</div>
						</div>
					</div>
					<div class="row">
						<div class="col-xs-12">
							<div class="form-group">
								<label class="control-label col-sm-2" title="">
									<span class="required hide">*</span> 反馈人电话：<i class="fa icon-question hide"></i></label>
								<div class="col-sm-8">
									<span class="lh-contentText">${taskReceiveOne.feedbackPhone!'无'}</span>
								</div>
							</div>
						</div>
					</div>
					<div class="row">
						<div class="col-xs-12">
							<div class="form-group">
								<label class="control-label col-sm-2" title="">
									<span class="required hide">*</span> 附件上传：<i class="fa icon-question hide"></i></label>
								<div class="col-sm-8">
									<#form:fileupload id="upload1" bizKey="${taskReceiveOne.id}" bizType="dcSupTaskFeedback_file"
									uploadType="all" class="" readonly="true" isMini="true" preview="true"/>
								</div>
							</div>
						</div>
					</div>
					<div class="row">
					<div class="col-xs-12">
						<div class="form-group">
							<label class="control-label col-sm-2" title="">
								<span class="required hide">*</span> 审批人：<i class="fa icon-question hide"></i></label>
							<div class="col-sm-8">
								<span class="lh-contentText">${taskReceiveOne.auditorName!'无'}</span>
							</div>
						</div>
					</div>
					</div>
					<div class="row">
						<div class="col-sm-offset-2 col-sm-10">
							<% if (parseInt(taskReceiveOne.feedbackStatus)>1){ %>
							<% if(dcSupTaskInfoRes.remarks3=='1'){ %>
								<button type="button" class="btn btn-sm btn-default" id="changeProgress" onclick="changeProgressB()"><i ></i> ${text('修改完成进度')}</button>
							<% } %>
							<button type="button" class="btn btn-sm btn-default" id="auditRecord" onclick="auditRecordB()"><i ></i> ${text('审核记录')}</button>
							<% } %>
							<button type="button" class="btn btn-sm btn-default" id="btnCancel" onclick="js.closeCurrentTabPage()"><i class="fa fa-reply-all"></i> ${text('关 闭')}</button>
						</div>
					</div>
				</div>
			    </#form:form>
			</div>
			<div class="ui-layout-content mainDepBoxright">
				<div style="height: 54px;display: flex;align-items: center;position: relative" >
					<span style="position: absolute;left: 10px;font-size: 20px;bottom: 12px">任务信息</span>
<!--
					<button class="btn btn-default btn-sm" style="background: #FFF;border: 1px solid #DCDFE6;color: #606266;position: absolute;right: 10px" onclick="taskLeaderContent()">批示</button>
-->
				</div>
				<div class="box-footer">
					<div class="row">
						<span class="required hide">*</span> ${text('任务年度')}：<i class="fa icon-question hide"></i>
						<span class="lh-contentText">${dcSupTaskInfoRes.taskYear!'无'}</span>
					</div>
					<div class="row">
						<span class="required hide">*</span> ${text('任务标题')}：<i class="fa icon-question hide"></i>
						<span class="lh-contentText">${dcSupTaskInfoRes.taskTitle!'无'}</span>
					</div>
					<div class="row">
						<span class="required hide">*</span> ${text('任务类型')}：<i class="fa icon-question hide"></i>
						<span class="lh-contentText">${dcSupTaskInfoRes.taskTypeName!'无'}</span>
					</div>
					<div class="row">
						<span class="required hide">*</span> ${text('任务内容')}：<i class="fa icon-question hide"></i>
						<span class="lh-contentText">${dcSupTaskInfoRes.taskContent!'无'}</span>
					</div>
					<div class="row">
						<span class="required hide">*</span> ${text('开始时间')}：<i class="fa icon-question hide"></i>
						<span class="lh-contentText">${dcSupTaskInfoRes.taskStartTimeStr!'无'}</span>
					</div>
					<div class="row">
						<span class="required hide">*</span> ${text('结束时间')}：<i class="fa icon-question hide"></i>
						<span class="lh-contentText">${dcSupTaskInfoRes.taskEndTimeStr!'无'}</span>
					</div>
					<div class="row">
						<span class="required hide">*</span> ${text('督办要求')}：<i class="fa icon-question hide"></i>
						<span class="lh-contentText">${dcSupTaskInfoRes.taskRequireName!'无'}</span>
					</div>
					<% if(dcSupTaskInfoRes.normalFlag == '2'){ %>
					<div class="row">
						<span class="required hide">*</span> ${text('协同单位')}：<i class="fa icon-question hide"></i>
						<span class="lh-contentText">${dcSupTaskInfoRes.taskCoopOrgName!'无'}</span>
					</div>
					<div class="row">
						<span class="required hide">*</span> ${text('督办人')}：<i class="fa icon-question hide"></i>
						<span class="lh-contentText">${dcSupTaskInfoRes.taskSupUserName!'无'}</span>
					</div>
					<div class="row">
						<span class="required hide">*</span> ${text('督办科室')}：<i class="fa icon-question hide"></i>
						<span class="lh-contentText">${dcSupTaskInfoRes.taskSupOrgName!'无'}</span>
					</div>
					<% } %>
					<div class="row">
						<span class="required hide">*</span> ${text('牵头领导')}：<i class="fa icon-question hide"></i>
						<span class="lh-contentText">${dcSupTaskInfoRes.taskLeaderName!'无'}</span>
					</div>

					<div class="row">
						<span class="required hide">*</span> ${text('联系人')}：<i class="fa icon-question hide"></i>
						<span class="lh-contentText">${dcSupTaskInfoRes.contactName!'无'}</span>
					</div>
					<div class="row">
						<span class="required hide">*</span> ${text('联系电话')}：<i class="fa icon-question hide"></i>
						<span class="lh-contentText">${dcSupTaskInfoRes.contactPhone!'无'}</span>
					</div>
					<div class="row">
						<span class="required hide">*</span> ${text('发起单位')}：<i class="fa icon-question hide"></i>
						<span class="lh-contentText">${dcSupTaskInfoRes.createOrgName!'无'}</span>
					</div>
					<div class="row">
						<span class="required hide">*</span> ${text('反馈时间要求')}：<i class="fa icon-question hide"></i>
						<span class="lh-contentText">${dcSupTaskInfoRes.remarks2!'无'}</span>
					</div>
					<!--<div class="row">
						<div class="col-xs-12">
							<div class="form-group">
								<label class="control-label col-sm-4" title="">
									<span class="required hide">*</span> ${text('反馈要求')}：<i class="fa icon-question hide"></i></label>
								<div class="col-sm-8">
									<span class="lh-contentText">${dcSupTaskInfoRes.remarks2!'无'}</span>
								</div>
							</div>
						</div>
					</div>-->
					<div class="row">
						<span class="required hide">*</span> ${text('附件上传')}：<i class="fa icon-question hide"></i></label>
					</div>
					<#form:fileupload id="uploadFile" bizKey="${dcSupTaskInfoRes.id}" bizType="dcSupTaskInfo_file"
					uploadType="all" class="" readonly="true" isMini="true" preview="true"/>
				</div>
			</div>
		</div>
	</div>
</div>
<% } %>
<script>
	if('${taskReceiveOne.dispatchFlag}'=='0'){
		$('#idOne').hide();
	}
$("#inputForm").validate({
	submitHandler: function(form){
		js.ajaxSubmitForm($(form), function(data){
			js.showMessage(data.message);
			if(data.result == Global.TRUE){
				js.closeCurrentTabPage(function(contentWindow){
					contentWindow.page();
				});
			}
		}, "json");
    }
});

// 选中事件
$('#feedbackProgress').on('ifChecked', function(){
	if($('#feedbackProgress input:radio:checked').val()=='3'){
		$('#feedbackRate').val(100);
		$('#feedbackRate').attr("readonly","readonly")
	}else if($('#feedbackProgress input:radio:checked').val()=='4'){
		$('#feedbackRate').val(100);
		$('#feedbackRate').removeAttr("readonly");
	}else {
		$('#feedbackRate').val('${taskReceiveOne.feedbackRate}');
	}

});
function clickWatch(){
		js.layer.open({
			type: 2,
			title: [''],
			area: ['300px', '500px'],
			scrollbar: true,
			shadeClose: false,
			content: "${ctx}/audit/taskReceive/taskReceiveThree?id=${dcSupTaskActionRes.id}",
			btn1: function (index, layero) {
			},
			end:function () {
			}
		});
}

// 	onchange="changeTime()"
// function changeTime(){
// 	$.ajax({
// 		url:"${ctx}/feedback/dcSupTaskFeedback/getOverRide?feedbackEndTimeStr="+$('#feedbackEndTime').val()+"&actionId=${taskReceiveOne.actionId}",
// 		type:"GET",
// 		success:function(req){
//
// 		},
// 	});
// }

function changeProgressB(){
	js.layer.open({
		type: 2,
		title: ['修改完成进度'],
		area: ['800px', '300px'],
		scrollbar: true,
		shadeClose: false,
		content: "${ctx}/audit/taskReceive/taskReceiveSix?id=${taskReceiveOne.id}",
		btn1: function (index, layero) {
		},
		end:function () {
			location.reload();
		}
	});
}
function auditRecordB(){
	js.layer.open({
		type: 2,
		title: ['审核记录'],
		area: ['800px', '300px'],
		scrollbar: true,
		shadeClose: false,
		content: "${ctx}/audit/taskReceive/taskReceiveSeven?id=${taskReceiveOne.id}",
		btn1: function (index, layero) {
		},
		end:function () {
			// $('#dataGrid').dataGrid('refresh', 1, 20);
		}
	});
}

function taskLeaderContent(){
	js.layer.open({
		type: 2,
		title: [''],
		area: ['1000px', '500px'],
		scrollbar: true,
		shadeClose: false,
		content: "${ctx}/audit/taskReceive/getLeaderExplainView?actionId=${dcSupTaskInfoRes.id}",
		btn1: function (index, layero) {
		},
		end:function () {
		}
	});
}
</script>